/**
 * 19/02/2014
 * 
 * SupplierBO
 */
package org.cuatrovientos.erp.business;

import java.util.List;

import org.cuatrovientos.erp.dao.SupplierDAOInterface;
import org.cuatrovientos.erp.model.Supplier;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * Holds all the business logic for Supplier related management
 * @author Javier Tejedor
 */
public class SupplierBO implements SupplierBOInterface {

	@Autowired
	private SupplierDAOInterface supplierDAO;

	@Override
	public Supplier selectById(int id) {
		return supplierDAO.selectById(id);
	}

	@Override
	public List<Supplier> selectAll() {
		return supplierDAO.selectAll();
	}

	@Override
	public List<Supplier> search(String description) {
		return supplierDAO.search(description);
	}

	@Override
	public void deleteById(int id) {
		supplierDAO.deleteById(id);
	}

	@Override
	public void insert(Supplier supplier) {
		supplierDAO.insert(supplier);
	}

	@Override
	public void update(Supplier supplier) {
		supplierDAO.update(supplier);
	}
	
}
